export const deletePopHook = () => {
    const { proxy } = getCurrentInstance();
    const deletePop = (multipleSelection, fn) => {
        if (multipleSelection.value.length == 1) {
            proxy.$modal.confirm("确认信息", '警告', {
                confirmButtonText: '删除',
                cancelButtonText: '取消',
                type: 'warning',
            }
            ).then(() => {
                fn()
            })
                .catch(() => {
                    proxy.$modal.msg('取消成功')
                })
        } else if (multipleSelection.value.length == 0) {
            proxy.$modal.msgWarning("请勾选一条数据");
        } else {
            proxy.$modal.msgWarning("只能一条一条删除，禁止多个删除数据(@&@)");
        }
    }
    return deletePop
};